package com.atguigu.spzx.service.sms.properties;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * title:
 * author: zgl
 * date: 2024/1/17
 * description：
 */
@Component
@Data
@ConfigurationProperties(prefix = "spzx.sms")
public class SpzxSmsProperties {
    private String host;
    private String path;
    private String method;
    private String appcode;
    private String templateId;

    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String APPCODE;
    public static String TEMPLATE_ID;

    @PostConstruct
    public void init() {
        HOST = this.host;
        PATH = this.path;
        METHOD = this.method;
        APPCODE = this.appcode;
        TEMPLATE_ID = this.templateId;

    }
}
